﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IRC.NET.Users;

namespace IRC.NET.Commands
{
    public class PartCommand : OneWayCommandBase
    {
        private static readonly string COMMAND_PREFIX = "PART";

        public PartCommand(Channel channel, string partMessage) 
            : base(COMMAND_PREFIX)
        {
            this.SetParameter("Channel", channel.Name);

            if (!string.IsNullOrEmpty(partMessage))
            {
                this.SetParameter("Message", string.Format(":{0}", partMessage));
            }
        }
    }
}
